/**
 *向后台发送数据请求全局配置文件
 */
import http from "basic/axios";

const uri = require("data/uri.json");

const fetch = {
	//用户登录
	login(params, success, fail) {
		return http.fetchPost(uri.auth.login, params, success, fail);
	},
	//用户注册
	register(params, success, fail) {
		return http.fetchPost(uri.auth.register, params, success, fail);
	},
	//重置密码
	resetPwd(params, success, fail) {
		return http.fetchPost(uri.auth.resetPwd, params, success, fail);
	},
	//更新密码
	updatePwd(params, success, fail) {
		return http.fetchPost(uri.auth.updatePwd, params, success, fail);
	},
	//测试
	test(success, fail) {
		return http.fetchGet(uri.rest.test, success, fail);
	}
};
export default fetch;
